package br.com.raulfortes.guardasenha.iu;
import java.awt.FlowLayout;
import java.awt.GraphicsEnvironment;
import java.awt.Point;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import javax.swing.JButton;

import javax.swing.JFrame;
import javax.swing.JLabel;

/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class TelaSobre extends javax.swing.JDialog {
	
	private static final long serialVersionUID = 1L;
	private JLabel jLabel1;
	private JLabel jLabel2;

	private TelaSobre parent;
	
	private JButton buttonOk;
	
	/**
	* Auto-generated main method to display this JDialog
	*/
	public static void main(String[] args) {
		JFrame frame = new JFrame();
		TelaSobre inst = new TelaSobre(frame);
		inst.setVisible(true);
	}
	
	public TelaSobre(JFrame frame) {
		super(frame);
		parent = this;
		{
			jLabel1 = new JLabel();
			getContentPane().add(jLabel1);
			jLabel1.setText("Guarda Senha");
		}
		{
			jLabel2 = new JLabel();
			getContentPane().add(jLabel2);
			jLabel2.setText("http://www.raulfortes.com.br/guardasenha");
		}
		initGUI();
		this.setSize(400, 192);
		
		//Center frame
		GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
        Point center = ge.getCenterPoint();
		this.setLocation(new java.awt.Point(center.x - this.getWidth()/2, center.y - this.getHeight()/2));

		
	}
	
	private void initGUI() {
		try {
			{
				this.setTitle("Sobre ...");
				this.setResizable(false);
				FlowLayout thisLayout = new FlowLayout();
				getContentPane().setLayout(thisLayout);
				this.setModal(true);
				{
					buttonOk = new JButton();
					getContentPane().add(buttonOk);
					buttonOk.setText("Ok");
					buttonOk.addMouseListener(new MouseAdapter() {
						public void mousePressed(MouseEvent evt) {
							parent.dispose();
						}
					});
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

}
